<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Arduino LibHelix: CommonHelix Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Arduino LibHelix
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_common_helix-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">CommonHelix Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Common Simple Arduino API.  
 <a href="class_common_helix.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_common_helix_8h_source.html">CommonHelix.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for CommonHelix:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_common_helix.png" usemap="#CommonHelix_map" alt=""/>
  <map id="CommonHelix_map" name="CommonHelix_map">
<area href="class_m_p3_decoder_helix.html" title="A simple Arduino API for the libhelix MP3 decoder. The data is provided with the help of write() call..." alt="MP3DecoderHelix" shape="rect" coords="0,56,115,80"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a80d2a45b2f49890a3dac50aafba862b4"><td class="memItemLeft" align="right" valign="top"><a id="a80d2a45b2f49890a3dac50aafba862b4"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#a80d2a45b2f49890a3dac50aafba862b4">begin</a> ()</td></tr>
<tr class="memdesc:a80d2a45b2f49890a3dac50aafba862b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the processing. <br /></td></tr>
<tr class="separator:a80d2a45b2f49890a3dac50aafba862b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a206e1ed6e173a6c3c329350ffeb011cf"><td class="memItemLeft" align="right" valign="top"><a id="a206e1ed6e173a6c3c329350ffeb011cf"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#a206e1ed6e173a6c3c329350ffeb011cf">end</a> ()</td></tr>
<tr class="memdesc:a206e1ed6e173a6c3c329350ffeb011cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Releases the reserved memory. <br /></td></tr>
<tr class="separator:a206e1ed6e173a6c3c329350ffeb011cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b1f8e8f34ba7701ed1de0bffbcb62f8"><td class="memItemLeft" align="right" valign="top"><a id="a2b1f8e8f34ba7701ed1de0bffbcb62f8"></a>
virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#a2b1f8e8f34ba7701ed1de0bffbcb62f8">write</a> (const void *in_ptr, size_t in_size)</td></tr>
<tr class="memdesc:a2b1f8e8f34ba7701ed1de0bffbcb62f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">decodes the next segments from the intput. The data can be provided in one short or in small incremental pieces. It is suggested to be called in the Arduino Loop. If the provided data does not fit into the buffer it is split up into small pieces that fit <br /></td></tr>
<tr class="separator:a2b1f8e8f34ba7701ed1de0bffbcb62f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aefed13d6943ba19af5dea2a9b2f6d853"><td class="memItemLeft" align="right" valign="top"><a id="aefed13d6943ba19af5dea2a9b2f6d853"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#aefed13d6943ba19af5dea2a9b2f6d853">operator bool</a> ()</td></tr>
<tr class="memdesc:aefed13d6943ba19af5dea2a9b2f6d853"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns true if active <br /></td></tr>
<tr class="separator:aefed13d6943ba19af5dea2a9b2f6d853"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a7a4bdd6a14c3728cfbb1ae5ab90f3224"><td class="memItemLeft" align="right" valign="top"><a id="a7a4bdd6a14c3728cfbb1ae5ab90f3224"></a>
virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#a7a4bdd6a14c3728cfbb1ae5ab90f3224">maxFrameSize</a> ()=0</td></tr>
<tr class="memdesc:a7a4bdd6a14c3728cfbb1ae5ab90f3224"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides the maximum frame size - this is allocated on the heap and you can reduce the heap size my minimizing this value. <br /></td></tr>
<tr class="separator:a7a4bdd6a14c3728cfbb1ae5ab90f3224"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab2967a6340b4c35f2fe80a3b9ea2f66"><td class="memItemLeft" align="right" valign="top"><a id="aab2967a6340b4c35f2fe80a3b9ea2f66"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#aab2967a6340b4c35f2fe80a3b9ea2f66">setMaxFrameSize</a> (size_t len)</td></tr>
<tr class="memdesc:aab2967a6340b4c35f2fe80a3b9ea2f66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Define your optimized maximum frame size. <br /></td></tr>
<tr class="separator:aab2967a6340b4c35f2fe80a3b9ea2f66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83c19f941b06e701f07a87850706fe45"><td class="memItemLeft" align="right" valign="top"><a id="a83c19f941b06e701f07a87850706fe45"></a>
virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#a83c19f941b06e701f07a87850706fe45">maxPWMSize</a> ()=0</td></tr>
<tr class="memdesc:a83c19f941b06e701f07a87850706fe45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides the maximum pwm buffer size - this is allocated on the heap and you can reduce the heap size my minimizing this value. <br /></td></tr>
<tr class="separator:a83c19f941b06e701f07a87850706fe45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac08d7221e4668a84b5ca02e0d69d1f4d"><td class="memItemLeft" align="right" valign="top"><a id="ac08d7221e4668a84b5ca02e0d69d1f4d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#ac08d7221e4668a84b5ca02e0d69d1f4d">setMaxPWMSize</a> (size_t len)</td></tr>
<tr class="memdesc:ac08d7221e4668a84b5ca02e0d69d1f4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Define your optimized maximum pwm buffer size. <br /></td></tr>
<tr class="separator:ac08d7221e4668a84b5ca02e0d69d1f4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa056ef36de8ffa70a7e5530d9877d8c4"><td class="memItemLeft" align="right" valign="top"><a id="aa056ef36de8ffa70a7e5530d9877d8c4"></a>
virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#aa056ef36de8ffa70a7e5530d9877d8c4">findSynchWord</a> (int offset=0)=0</td></tr>
<tr class="memdesc:aa056ef36de8ffa70a7e5530d9877d8c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the synchronization word in the frame buffer (starting from the indicated offset) <br /></td></tr>
<tr class="separator:aa056ef36de8ffa70a7e5530d9877d8c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa27e41051f473fde943091defa928f6"><td class="memItemLeft" align="right" valign="top"><a id="aaa27e41051f473fde943091defa928f6"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#aaa27e41051f473fde943091defa928f6">decode</a> (<a class="el" href="struct_range.html">Range</a> r)=0</td></tr>
<tr class="memdesc:aaa27e41051f473fde943091defa928f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decodes a frame. <br /></td></tr>
<tr class="separator:aaa27e41051f473fde943091defa928f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace99e1cf9aff1dd38dbb32303969049d"><td class="memItemLeft" align="right" valign="top"><a id="ace99e1cf9aff1dd38dbb32303969049d"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#ace99e1cf9aff1dd38dbb32303969049d">appendToBuffer</a> (const void *in_ptr, int in_size)</td></tr>
<tr class="memdesc:ace99e1cf9aff1dd38dbb32303969049d"><td class="mdescLeft">&#160;</td><td class="mdescRight">we add the data to the buffer until it is full <br /></td></tr>
<tr class="separator:ace99e1cf9aff1dd38dbb32303969049d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ccf08db79e6effe0d35a9da298f9b4d"><td class="memItemLeft" align="right" valign="top"><a id="a1ccf08db79e6effe0d35a9da298f9b4d"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#a1ccf08db79e6effe0d35a9da298f9b4d">writeFrame</a> (const void *in_ptr, size_t in_size)</td></tr>
<tr class="memdesc:a1ccf08db79e6effe0d35a9da298f9b4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">appends the data to the frame buffer and decodes <br /></td></tr>
<tr class="separator:a1ccf08db79e6effe0d35a9da298f9b4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27342368d7514d51ef6006ffa944b14e"><td class="memItemLeft" align="right" valign="top"><a id="a27342368d7514d51ef6006ffa944b14e"></a>
<a class="el" href="struct_range.html">Range</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#a27342368d7514d51ef6006ffa944b14e">synchronizeFrame</a> ()</td></tr>
<tr class="memdesc:a27342368d7514d51ef6006ffa944b14e"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns true if we have a valid start and end synch word. <br /></td></tr>
<tr class="separator:a27342368d7514d51ef6006ffa944b14e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcd7672475ef7ca375d034c54a189873"><td class="memItemLeft" align="right" valign="top"><a id="adcd7672475ef7ca375d034c54a189873"></a>
<a class="el" href="struct_range.html">Range</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_helix.html#adcd7672475ef7ca375d034c54a189873">frameRange</a> ()</td></tr>
<tr class="memdesc:adcd7672475ef7ca375d034c54a189873"><td class="mdescLeft">&#160;</td><td class="mdescRight">determines the next start and end synch word in the buffer <br /></td></tr>
<tr class="separator:adcd7672475ef7ca375d034c54a189873"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade06a3486137403b516edd03b01cf890"><td class="memItemLeft" align="right" valign="top"><a id="ade06a3486137403b516edd03b01cf890"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>checkMemory</b> ()</td></tr>
<tr class="separator:ade06a3486137403b516edd03b01cf890"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae86bb92149ea6decbc6eab4e68852036"><td class="memItemLeft" align="right" valign="top"><a id="ae86bb92149ea6decbc6eab4e68852036"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>advanceFrameBuffer</b> (int offset)</td></tr>
<tr class="separator:ae86bb92149ea6decbc6eab4e68852036"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ad98057a0e3fd511613b94012d5d055f0"><td class="memItemLeft" align="right" valign="top"><a id="ad98057a0e3fd511613b94012d5d055f0"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>active</b> = false</td></tr>
<tr class="separator:ad98057a0e3fd511613b94012d5d055f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a646af1405f8f13900fec230c537929fd"><td class="memItemLeft" align="right" valign="top"><a id="a646af1405f8f13900fec230c537929fd"></a>
Print *&#160;</td><td class="memItemRight" valign="bottom"><b>out</b> = nullptr</td></tr>
<tr class="separator:a646af1405f8f13900fec230c537929fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe52d0a6189282f3915a906d7c2ea692"><td class="memItemLeft" align="right" valign="top"><a id="abe52d0a6189282f3915a906d7c2ea692"></a>
Stream *&#160;</td><td class="memItemRight" valign="bottom"><b>in</b> = nullptr</td></tr>
<tr class="separator:abe52d0a6189282f3915a906d7c2ea692"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a999886f18f86f65d44f6173653547d01"><td class="memItemLeft" align="right" valign="top"><a id="a999886f18f86f65d44f6173653547d01"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>buffer_size</b> = 0</td></tr>
<tr class="separator:a999886f18f86f65d44f6173653547d01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa45ba13b15c1e8fde9c0a0607642b71"><td class="memItemLeft" align="right" valign="top"><a id="afa45ba13b15c1e8fde9c0a0607642b71"></a>
uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><b>frame_buffer</b> = nullptr</td></tr>
<tr class="separator:afa45ba13b15c1e8fde9c0a0607642b71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0458b1899a094e836ec9586359d7af27"><td class="memItemLeft" align="right" valign="top"><a id="a0458b1899a094e836ec9586359d7af27"></a>
short *&#160;</td><td class="memItemRight" valign="bottom"><b>pwm_buffer</b> = nullptr</td></tr>
<tr class="separator:a0458b1899a094e836ec9586359d7af27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a666e7e1837c19708a68d4a44bfd12187"><td class="memItemLeft" align="right" valign="top"><a id="a666e7e1837c19708a68d4a44bfd12187"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>max_frame_size</b> = 0</td></tr>
<tr class="separator:a666e7e1837c19708a68d4a44bfd12187"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08f9f1446aa9cdcd929b31159e1fdd72"><td class="memItemLeft" align="right" valign="top"><a id="a08f9f1446aa9cdcd929b31159e1fdd72"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>max_pwm_size</b> = 0</td></tr>
<tr class="separator:a08f9f1446aa9cdcd929b31159e1fdd72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cb844b8e466a00c4cf5cb2ededaa8a0"><td class="memItemLeft" align="right" valign="top"><a id="a4cb844b8e466a00c4cf5cb2ededaa8a0"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>frame_counter</b> = 0</td></tr>
<tr class="separator:a4cb844b8e466a00c4cf5cb2ededaa8a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Common Simple Arduino API. </p>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li>src/<a class="el" href="_common_helix_8h_source.html">CommonHelix.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
